package Chapter09;

class TestRectangle {
	float length;
	float width;

	TestRectangle(float len, float wh) {
		length = len;
		width = wh;
	}

	float getArea() {
		return length * width;
	}
}

class Square extends TestRectangle {
	float length;

	Square(float len) {
		super(len, len);
		length = len;
	}

	float getArea() {
		return super.getArea();
	}
}

public class Rectangle {
	public static void main(String[] args) {
		Square sq = new Square(5.2f);
		System.out.println("side is" + sq.length + ",area is" + sq.getArea());
	}
}